package com.hq.ims.data.event;

import com.hq.ims.data.entity.Company;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * TODO
 *
 * @author jbp
 * @date 2024/11/8
 */
public class CompanyEvent extends ApplicationEvent {

    /**
     * 用户加入企业
     */
    public final static String USER_JOIN_COMPANY = "USER_JOIN_COMPANY";

    /**
     * 新注册公司
     */
    public final static String REGISTER_COMPANY = "REGISTER_COMPANY";

    /**
     * 编辑公司
     */
    public final static String EDIT_COMPANY = "EDIT_COMPANY";

    /**
     * 撤销审核
     */
    public final static String CANCEL_COMPANY_AUDIT = "CANCEL_COMPANY_AUDIT";

    /**
     * 编辑分配规则
     */
    public final static String EDIT_DISTRIBUTION_RULE = "EDIT_DISTRIBUTION_RULE";

    /**
     * 平台审核拒绝
     */
    public final static String PLATFORM_AUDIT_PASS_EVENT = "PLATFORM_AUDIT_PASS_EVENT";

    /**
     * 平台审核不通过
     */
    public final static String PLATFORM_AUDIT_NOT_PASS_EVENT = "PLATFORM_AUDIT_NOT_PASS_EVENT";

    @Getter
    protected String eventType;

    @Getter
    private Company company;

    public CompanyEvent(Object source, Company company, String eventType) {
        super(source);
        this.company = company;
        this.eventType = eventType;
    }

}
